<!DOCTYPE html>
<html>
<head>
    {include file="../application/common/header.html" /}
</head>

<body>
    <div id="teacher_routine_regtb">
        <form id="teacher_routine_regForm" class="m5">
            <?php echo currTerm()["termName"] ?>
            教师姓名：
            <input class="form-control1" name="teacherName" id="teacherName">
            <a class="easyui-linkbutton l-btn l-btn-small" data-options="iconCls:'icon-search'" onclick="searchForm('teacher_routine_reg')">查询</a>
            <a class="easyui-linkbutton l-btn l-btn-small" data-options="iconCls:'icon-clear'" onclick="resetForm('teacher_routine_reg')">重置</a><br/>
        </form>
    </div>
    <table id="teacher_routine_regdg">
        <thead>
            <tr>
                <th data-options="field:'ID',checkbox:true">ID</th>
                <th data-options="field:'评价部门',title:'评价部门',editor:{
                    type:'combobox',
                    options:{
                        editable:false,
                        panelHeight:'auto',
                        required:true,
                        url:'{:url(\'teacherRoutineConf/departList\')}',
                        onSelect:commentTypeList
                    }}"></th>
                <th data-options="field:'评价类别',title:'评价类别',width:110,editor:{type:'combobox',options:{
                    editable:false,
                    required:true,
                    url:'teacherRoutine/teacher_routine_conf/commentTypeList?depart='}}"></th>
                <th data-options="field:'评价日期',title:'评价日期',editor:{
                    type:'datebox',options:{required:true}}"></th>
                <th data-options="field:'教师ID',title:'教师',editor:{
                    type:'combobox',
                    options:{
                        method:'get',
                        url: '/compent/Util/teacherList.html',
                        required:true
                    }
                },formatter:function(value,row,index){
                    return row.姓名;
                }"></th>
                <th data-options="field:'评价内容',title:'评价内容',width:200,editor:{
                    type:'textbox',options:{required:true}},
                formatter: function(value, row, index) {
                    return '<span class=\'note\' title=\''+value+'\'>'+ value + '</span>';
                }"></th>
                <th data-options="field:'加减分',title:'加减分',editor:{
                    type:'numberbox',options:{required:true}}"></th>
            </tr>
        </thead>
    </table>

    <script type="text/javascript">
        $(function(){
            var url = "/teacherRoutine/teacher_routine_reg";
            initDatagridAdmin("teacher_routine_reg",url,1,1,1,1,1);
        })  
        function commentTypeList(record){
            var url="teacherRoutine/teacher_routine_conf/commentTypeList?depart=" + record.value;
            var ed=$('#teacher_routine_regdg').datagrid('getEditor',{index:dgEditIndex['teacher_routine_reg'],field:'评价类别'});
            var row = $('#teacher_routine_regdg').datagrid("getSelections")[0];
            $(ed.target).combobox('setValue', row ? row.评价类别 : "");
            $(ed.target).combobox('reload',url);
        }
    </script>
</body>
</html>